import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Reg from '@/components/Reg'
import Main from '@/components/Main'
import Shop from '@/components/Views/Shop'
import Order from '@/components/Views/Order'
import User from '@/components/Views/User'
import Types from '@/components/Views/Types'
import Types2 from '@/components/Views/Types2'
import Card from '@/components/Views/Card'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/reg',
      name: 'Reg',
      component: Reg
    },
    {
      path: '/main',
      component:Main,
      children:[
        {path:'',redirect:'user'},
        {path:'order',name:'Order',component:Order},
        {path:'user',name:'User',component:User},
        {path:'shop',name:'Shop',component:Shop},
        {path:'types',name:'Types',component:Types},
        {path:'types2',name:'Types2',component:Types2},
        {path:'card',name:'Card',component:Card},
      ]
    },
  ]
})
